import NoticeComponent from './Notice.vue'
 
import createComponent from '@/utils/create-component'
 
export default {
  install(Vue) {
    Vue.prototype.createNotice = (props) => createComponent(NoticeComponent, props)
  },
 
  success(props) {
    props = Object.assign({title: '提示'}, props)
 
    return createComponent(NoticeComponent, props)
  },
 
  fail(props) {
    props = Object.assign({title: '警告'}, props)
 
    return createComponent(NoticeComponent, props)
  }
}